#ifndef XMAIN_H
#define XMAIN_H

#include <string>

#ifdef XEXPORTING
#define XEXPORT_DLL __declspec(dllexport)
#else
#define XEXPORT_DLL __declspec(dllimport)
#endif

struct XEXPORT_DLL XString
{
	std::string String;

	XString();
	XString(const char* str);
	XString(std::string str);
	XString(int number);

};

struct XEXPORT_DLL XHash
{
	XString String;
	int Hash;

	XHash();
	XHash(XString str);

	int _getHash(const char* str);
	bool operator== (XHash hash);
	bool operator==(const char* str);
};

struct XEXPORT_DLL XColor
{
	float R;
	float G;
	float B;
	float A;

	XColor();
	XColor(float r, float g, float b, float a);

	XColor operator*(float val);
	XColor operator+(XColor color);
	XColor operator-(XColor color);
	XColor operator/(float val);
	XColor operator+=(XColor color);
};

struct XVertex;

struct XEXPORT_DLL XPosition
{
	float X;
	float Y;

	XPosition();
	XPosition(float x, float y);
	void operator=(XVertex vert);
};

struct XEXPORT_DLL XVector
{
	float X;
	float Y;

	XVector();
	XVector(float x, float y);

	XVector operator*(float val);
	XVector operator-(XVector vec);
	XVector operator+(XVector vec);
	XVector operator/(float val);
	XVector operator+=(XVector vec);
};

struct XEXPORT_DLL XVertex
{
	float X;
	float Y;

	XVertex();
	XVertex(int x, int y);
	void operator=(XPosition pos);
};

struct XEXPORT_DLL XVertexData
{
	XVertex Position;
	XVertex TextureCoord;
};

struct XEXPORT_DLL XRectangle
{
	float X;
	float Y;
	float W;
	float H;

	XRectangle();
	XRectangle(float x, float y, float w, float h);

	bool Colide(XRectangle rect);
	bool Colide(XPosition pos);
	bool operator==(XRectangle rect);
};

void XEXPORT_DLL XSetAddictiveBlend();
void XEXPORT_DLL XSetNormalBlend();
void XEXPORT_DLL XPushTransformation();
void XEXPORT_DLL XPopTransformation();
void XEXPORT_DLL XSetColor(XColor color);
void XEXPORT_DLL XSetTranslation(XVector vec);
void XEXPORT_DLL XSetRotation(int angle);
void XEXPORT_DLL XSetScale(float scale);

#endif
